import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department";
import Employee from "./views/org/Employee";
import Config from "./views/sysmanage/Config";
import Dictionary from "./views/sysmanage/Dictionary";
import Dictionaryitem from "./views/sysmanage/Dictionaryitem";
import ProductType from "./views/prod/ProductType";
import Product from "./views/prod/Product";
import Clue from "./views/market/Clue";
import ClueActivity from "./views/market/ClueActivity";
import ClueRemark from "./views/market/ClueRemark";
import Business from "./views/market/Business";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'el-icon-s-home',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构模块',
        iconCls: 'el-icon-office-building',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统模块',
        iconCls: 'el-icon-s-platform',
        children: [
            { path: '/config', component: Config, name: '系统配置' },
            { path: '/dictionary', component: Dictionary, name: '数据字典' },
            { path: '/dictionaryitem', component: Dictionaryitem, name: '字典明细' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品模块',
        iconCls: 'el-icon-shopping-cart-full',
        // leaf: true,//只有一个节点
        children: [
            { path: '/productType', component: ProductType, name: '产品类型管理' },
            { path: '/product', component: Product, name: '产品管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '营销模块',
        iconCls: 'el-icon-s-marketing',
        // leaf: true,//只有一个节点
        children: [
            { path: '/clue', component: Clue, name: '线索管理' },
            { path: '/clueRemark', component: ClueRemark, name: '线索备注管理' },
            { path: '/clueActivity', component: ClueActivity, name: '线索活动管理' },
            { path: '/business', component: Business, name: '商机管理' }
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;